package com.spvs.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.spvs.system.mapper.FileRecycleBinMapper;
import com.spvs.system.domain.FileRecycleBin;
import com.spvs.system.service.IFileRecycleBinService;

/**
 * 文件回收站Service业务层处理
 *
 * @author supervision
 * @date 2024-12-12
 */
@Service
public class FileRecycleBinServiceImpl implements IFileRecycleBinService
{
    @Autowired
    private FileRecycleBinMapper fileRecycleBinMapper;

    /**
     * 查询文件回收站
     *
     * @param recycleBinId 文件回收站主键
     * @return 文件回收站
     */
    @Override
    public FileRecycleBin selectFileRecycleBinByRecycleBinId(Long recycleBinId)
    {
        return fileRecycleBinMapper.selectFileRecycleBinByRecycleBinId(recycleBinId);
    }

    /**
     * 查询文件回收站列表
     *
     * @param fileRecycleBin 文件回收站
     * @return 文件回收站
     */
    @Override
    public List<FileRecycleBin> selectFileRecycleBinList(FileRecycleBin fileRecycleBin)
    {
        return fileRecycleBinMapper.selectFileRecycleBinList(fileRecycleBin);
    }

    /**
     * 新增文件回收站
     *
     * @param fileRecycleBin 文件回收站
     * @return 结果
     */
    @Override
    public int insertFileRecycleBin(FileRecycleBin fileRecycleBin)
    {
        return fileRecycleBinMapper.insertFileRecycleBin(fileRecycleBin);
    }

    /**
     * 修改文件回收站
     *
     * @param fileRecycleBin 文件回收站
     * @return 结果
     */
    @Override
    public int updateFileRecycleBin(FileRecycleBin fileRecycleBin)
    {
        return fileRecycleBinMapper.updateFileRecycleBin(fileRecycleBin);
    }

    /**
     * 批量删除文件回收站
     *
     * @param recycleBinIds 需要删除的文件回收站主键
     * @return 结果
     */
    @Override
    public int deleteFileRecycleBinByRecycleBinIds(Long[] recycleBinIds)
    {
        return fileRecycleBinMapper.deleteFileRecycleBinByRecycleBinIds(recycleBinIds);
    }

    /**
     * 删除文件回收站信息
     *
     * @param recycleBinId 文件回收站主键
     * @return 结果
     */
    @Override
    public int deleteFileRecycleBinByRecycleBinId(Long recycleBinId)
    {
        return fileRecycleBinMapper.deleteFileRecycleBinByRecycleBinId(recycleBinId);
    }
}
